package com.coderman.common.starter.excelport.imports.beans;

/**
 * Description: 导入excel注解模型
 * date: 2020/9/15 1:38 下午
 *
 * @author fanchunshuai
 * @version 1.0.0
 * @since JDK 1.8
 */
public class ImportFieldBean {
    /**
     * 表格列名描述
     *
     * @return
     */
    private String title;

    /**
     * 是否唯一
     * 这里有两种含义
     * 1.导入的excel表中某几个字段组成的唯一含义，不能有重复，比如姓名+电话号码
     * 2.导入的excel表中某几个字段组成的唯一含义与数据库存的记录不能重复，比如姓名+电话号码
     * @return
     */
    private boolean isUnique;

    /**
     * 字段名  tableName.columnName
     * @return
     */
    private String columnName;

    /**
     * 字段类型
     * @return
     */
    private String columnType;

    /**
     * 表格列名索引位置,从0开始
     * @return
     */
    private int    index;

    /**
     * 表格字段值来源
     * @return
     */
    private String sourceKey;

    /**
     * 日期类型转换
     * @return
     */
    private String formate;


    /**
     * 字段转换，
     * 比如日期类型模型是str,entity是date
     * @return
     */
    private int referFieldIndex;

    /**
     * 是否允许为null,默认为true
     * @return
     */
    private boolean isNull;

    public boolean isNull() {
        return isNull;
    }

    public void setNull(boolean aNull) {
        isNull = aNull;
    }

    public int getReferFieldIndex() {
        return referFieldIndex;
    }

    public void setReferFieldIndex(int referFieldIndex) {
        this.referFieldIndex = referFieldIndex;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public boolean isUnique() {
        return isUnique;
    }

    public void setUnique(boolean unique) {
        isUnique = unique;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public String getSourceKey() {
        return sourceKey;
    }

    public void setSourceKey(String sourceKey) {
        this.sourceKey = sourceKey;
    }

    public String getFormate() {
        return formate;
    }

    public void setFormate(String formate) {
        this.formate = formate;
    }
}
